package com.cmcc.cmii.cmiiservicemanagement.rest;

import com.cmcc.cmii.cmiiservicemanagement.config.ServiceProperties;
import com.cmcc.cmii.cmiiservicemanagement.model.ServiceDefinition;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Thanks
 */
@RestController
@RequestMapping("/test")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class TestController {

    private final ServiceProperties serviceProperties;

    @GetMapping("/getProperties")
    public List<ServiceDefinition> getProperties(){
        return serviceProperties.getServices();
    }


}
